package com.interview.ujiuye2;

import java.util.ArrayList;
import java.util.List;
import java.util.stream.Stream;

/**
 * Copyright (C), 2018-2020
 * FileName: Demo2
 * Author:   kongfanyu
 * Date:     2020/10/10 20:22
 */
public class Demo2 {

    private static List<Employee> list = new ArrayList<>();
    static {
        list.add( new Employee("张三",38,5500.00) );
        list.add( new Employee("李四",30,4500.00) );
        list.add( new Employee("王五",48,6500.00) );
        list.add( new Employee("赵六",28,8500.00) );
    }

    public static void main(String[] args) {
        Stream<Employee> employeeStream = list.stream().filter(e -> e.getAge() > 35);
        employeeStream.forEach(System.out::println);
    }
}
